/**
 * 数据字典过滤器
 */
app.filter('dictionaryFiter', ["$rootScope", function($rootScope) {
    return function(value, key) {
        if(!key) {
            return "";
        }
        var arrary = $rootScope.dictionary[key];
        if(arrary) {
            for(var i = 0; i < arrary.length; i++) {
                var entity = arrary[i];
                var tmp = value;
                if(entity.value == tmp) {
                    return entity.label;
                }
            }
        }
        return "";
    };
}]);